/**
 * 
 */
package communication;

import java.io.IOException;
import java.net.UnknownHostException;

/**
 * @author Danielondon
 *
 */
public interface ICommunication {
	/**
	 * Connects to the specified ip and port.
	 * @param ipaddress
	 * @param port
	 * @throws NumberFormatException
	 * @throws UnknownHostException
	 * @throws IOException
	 * @throws  
	 */
	boolean Connect(String ipaddress, String port) throws Exception;
	
	/**
	 * Disconnects the current connection
	 * @throws IOException
	 */
	void Disconnect() throws Exception;
	
	/**
	 * Sends the Message and receives the reply of the server.
	 * @param message
	 * @throws IOException
	 */
	void SendMessage(String message) throws Exception;
	
	/**
	 * Receives the Message from the Server
	 * @return
	 * @throws IOException
	 */
	String ReceiveMessage() throws Exception;
}
